<div id="jm-left" class="" >
    <div class="jm-module " id="">
       <div class="jm-module-content">
          <h3 class="jm-title">海洋センター情報</h3>
          <div class="content-message">
            <table width="200" border="0" cellspacing="0" cellpadding="0">
                <tbody>
                <tr>
                <td width="30" height="24" align="right" nowrap="">■&nbsp;</td>
                <td width="170">都道府県を選択</td>
                </tr>
                <tr>
                <td></td>
                <td>
                
                
                <select name="jform[search_PREF_CODE]" id="search_PREF_CODE">
                    <option value="0">指定しない</option>
                    <?php
                        $list_pref = $this->list_pref;
                        foreach($list_pref as $value){
                    ?>
                    <option value="<?php echo $value->PREF_CODE; ?>"  <?php if($this->filter['search_PREF_CODE'] == $value->PREF_CODE){ echo 'selected="selected"'; } ?>  ><?php echo $value->PREF_NAME; ?></option>
                    <?php
                    
                        }
                    ?>                    
                
                </select>
                
                </td>
                </tr>
                <tr>
                <td height="24" align="right" nowrap="">■&nbsp;</td>
                <td>センター名：コードを入力</td>
                </tr>
                <tr>
                <td></td>
                <td><input name="jform[search_OCBA_NAME]" value="<?php echo $this->filter['search_OCBA_NAME']; ?>" id="search_OCBA_NAME" type="text" size="16" value="" /></td>
                </tr>
                <tr>
                <td height="24" align="right" nowrap="">■&nbsp;</td>
                <td>施設を選択</td>
                </tr>
                <tr>
                <td></td>
                
                   
                    <?php
              
                        foreach($this->listfacitype as $key=>$value){
                 
                    ?>
                     <td>
                    <input type="checkbox" name="jform[cbbFACI<?php echo $key; ?>]" id="chb<?php echo $key; ?>" value="<?php echo $key; ?>" <?php if(isset($this->filter['cbbFACI'.$key])){ echo 'checked="checked"'; } ?>  /><label for="chb<?php echo $key; ?>"><?php echo $value; ?></label>
                     </td></tr><tr><td></td>
                    <?php
                           
                        }
                    ?>
                   
                
                
                </tr>
                <tr>
                    <td width="30" height="24" align="right" nowrap="">■&nbsp;</td>
                    <td>類型を選択</td>
                </tr>
                <tr>
                    <td></td>
                    
                    <td>
                        <select name="jform[search_PEDE_CODE]" id="search_PEDE_CODE">
                            <option value="0">指定しない</option>
                        
                            <?php
                                $list_pede = $this->list_pede;
                                foreach($list_pede as $value){
                            ?>
                            <option value="<?php echo $value->PEDE_CODE; ?>" <?php if($this->filter['search_PEDE_CODE'] == $value->PEDE_CODE){ echo 'selected="selected"'; } ?> ><?php echo $value->PEDE_NAME; ?></option>
                            <?php
                            
                                }
                            ?>
                        
                        </select>
                    </td>
                </tr>
                <tr>
                    <td height="15" colspan="2"></td>
                </tr>
                <tr>
                    <td></td>
                    <td align="center">
                    <button id="search" name="btnsearch" type="button" onclick="Joomla.submitbutton('search')">検索</button>
                    <input id="print_centers" type="button" style="cursor:pointer;" name="CenterPrint" value="&nbsp;印刷画面&nbsp;"  />
                    </td>
                </tr>
                </tbody>
            </table>
            <input type="hidden" name="task" value="search"/>
            <input type="hidden" name="check" value="1"/>
            <input type="hidden" name="boxchecked" value="0"/>
          </div>
          <div class="clearfix"></div>
          
       </div>
    </div>
    
 </div>

 <script>
 jq(document).ready(function(){
    jq('#print_centers').click(function(){
        var plus = "";
        jq('input[type=checkbox]:checked').each(function(){
            plus += '&' + this.name + '=' + this.value;
        });
        window.open('index.php?top=page&option=com_frcenter&task=print' +
                '&jform[search_PREF_CODE]=' + jq('#search_PREF_CODE').val() +
                '&jform[search_OCBA_NAME]=' + encodeURI(jq('#search_OCBA_NAME').val()) +
                '&jform[search_PEDE_CODE]=' + jq('#search_PEDE_CODE').val()+
                plus
            ,'_blank'
        );
    });
});
 jq('#search_PREF_CODE').css("width","150px");
 jq('#search_OCBA_NAME').css("width","150px");
 jq('#search_PEDE_CODE').css("width","150px");
 </script>